﻿<div ng-controller="msgController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a ui-sref="app.manage.msg">消息配置</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" novalidate role="form">
        <div class="form-group">
            <label class="col-sm-2 control-label">名称</label>
            <div class="col-sm-10">
                <input name="name" type="text" class="form-control input-sm" ng-model="model.name" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">代码</label>
            <div class="col-sm-10">
                <input name="code" type="text" class="form-control input-sm" ng-model="model.code" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">内容</label>
            <div class="col-sm-10">
                <textarea name="content" class="form-control input-sm" ng-model="model.content" required></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">间隔时间(分)</label>
            <div class="col-sm-10">
                <input name="times" type="text" class="form-control input-sm" ng-model="model.times" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注</label>
            <div class="col-sm-10">
                <textarea name="remark" class="form-control input-sm" ng-model="model.remark"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-10">
                <input name="sort" type="text" class="form-control input-sm" ng-model="model.sort" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">发送类型</label>
            <div class="col-sm-10">
                <label class="checkbox-inline" ng-repeat="item in arr_send_type">
                    <input type="checkbox" name="send_type" ng-click="sel_send_type(item.id)" ng-checked="model.send_type.indexOf(item.id)!=-1"> {{item.name}}
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">分组</label>
            <div class="col-sm-10">
                <select class="form-control input-sm" ng-model="model.type">
                    <option value="1" ng-selected="model.type==1">用户</option>
                    <option value="2" ng-selected="model.type==2">购物</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
            </div>
        </div>
    </form>
</div>